package com.base.monitor.model.enums.code.impl.common;

import com.base.monitor.model.enums.code.BaseCode;
import lombok.AllArgsConstructor;

/**
 * @description:
 * @author: tsing
 * @create: 2020-08-09 15:03
 */
@AllArgsConstructor
public enum CacheCode implements BaseCode {

    // 4.5.缓存相关(4501~4599)
    CACHE_BUILD_FAILURE(false, 4501, "缓存构建失败"),
    NOT_EXISTS_SENTINEL_NODES(false, 4502, "没有配置哨兵节点"),
    ;

    private Boolean success; // 是否成功
    private int code; // 状态码
    private String message; // 操作信息

    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
